import React from 'react';
import { CircularProgress, Box } from '@mui/material';

interface LoaderProps {
  size?: number;
  color?: 'primary' | 'secondary' | 'inherit';
  [key: string]: any;
}

/**
 * Loader Component
 * Circular progress indicator for loading states
 */
const Loader: React.FC<LoaderProps> = ({
  size = 40,
  color = 'primary',
  ...otherProps
}) => {
  return (
    <Box
      display="flex"
      alignItems="center"
      justifyContent="center"
      {...otherProps}
    >
      <CircularProgress size={size} color={color} />
    </Box>
  );
};

export default Loader;

